﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using CLEXA.AdminClient.Cache;
using CLEXA.AdminClient.Properties;
using CLEXA.AdminClient.Services;
using CLEXA.AdminClient.View;
using CLEXA.AdminClient.ViewModel;
using CLEXA.ServiceContracts;

namespace CLEXA.AdminClient
{
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            IAdminService adminService = new AdminService(Settings.Default.AdminServiceURI);

            IUserCache userCache = new UserCache(adminService);
            IWindowHelper windowHelper = new WindowHelper();
            IFacade facade = new Facade(userCache, windowHelper);

            UserListVM vm = new UserListVM(facade);
            UserListView vw = new UserListView();
            vw.DataContext = vm;
            vw.ShowDialog();
        }
    }
}
